size = int(input("请输入三角形长度\n"))
# 直角在左下角
print("左下角")
i = 0
while i < size:
    j = 0
    while j <= i:
        print("*", end=" ")
        j += 1
    print()
    i += 1
# 直角在右下角
print("右下角")
i = 0
while i < size:
    n = 0
    while n <size-i-1:
        print(" ", end=" ")
        n += 1
    j = 0
    while j <= i:
        print("*", end=" ")
        j += 1
    print()
    i += 1
# 直角在左上角
print("左上角")
i = 0
while i < size:
    j = 0
    while j < (size - i):
        print("*", end=" ")
        j += 1
    print()
    i += 1
# 直角在右上角
print("右上角")
i = 0
while i < size:
    n = 0
    while n <i:
        print(" ", end=" ")
        n += 1
    j = 0
    while j < (size - i):
         print("*", end=" ")
         j += 1
    print()
    i += 1